-- GENERATED SPELL FOR [Stillpine Ancestor Coo] --


function spell0_17391(pUnit, Event) --@Elemental Spawn-in,Self--
pUnit:FullCastSpellOnTarget(25035,pUnit)
pUnit:RegisterEvent('Sorts_17391', 590, 1)
end

function spell1_17391(pUnit, Event) --@Ghost Walk,n/a--
pUnit:FullCastSpellOnTarget(30424,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_17391', 517, 1)
end

function Sorts_17391(pUnit, Event)
local choix_sorts_17391 = math.random(0, 1)
if choix_sorts_17391 == 0 then
pUnit:RegisterEvent('spell0_17391', 1, 1)
end
if choix_sorts_17391 == 1 then
pUnit:RegisterEvent('spell1_17391', 1, 1)
end
end

function mob17391_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_17391', math.random(1500, 3000), 1)
end

function mob17391_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob17391_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob17391_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(17391, 1, 'mob17391_Action')
RegisterUnitEvent(17391, 2, 'mob17391_Leave')
RegisterUnitEvent(17391, 3, 'mob17391_Kill')
RegisterUnitEvent(17391, 4, 'mob17391_Die')
